﻿@{
    ViewBag.Title = "JquerySelecter";
}
 <script src="@Url.Content("~/Scripts/jquery-1.7.1.min.js")" type="text/javascript"></script>
<script type="text/ecmascript">

    function idSelecter()
    {
        
        var str = $("#txt1").val();
        setMsg(str);

    }
    function setMsg(str)
    {
        $("#msg").text(str);
    }
</script>
<ul>
    <li><input id="btnIdSel" type="button" value="ID选择器"  onclick="idSelecter();"/> </li>
</ul>
<div id="div">
    <input id="txt1" type="text" value="china" />
</div>
<span id="msg"></span>
